import Vue from 'vue'
const formkey = {
  install: function() {
    Vue.directive('formkey', {
      inserted: function(el, binding) {
        const inputList = el.querySelectorAll('.el-form-item__content>.el-input>input')
        // const inputList= el.querySelectorAll('input')
        for (const i of inputList) {
          i.addEventListener('keydown', (e) => {
            if (e.keyCode === 13) {
              e.preventDefault()
              binding.value.query()
            }
          })
        }
      }
    }
    )
  }

}
export default formkey
